package cn.com.czpb.client.module.news.adapter;


import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import cn.com.czpb.client.R;
import cn.com.czpb.client.model.news.HighRiseBean;

import java.util.List;

/**
 * Created by Administrator on 2017/10/12.
 */

public class HighRiseAdapter extends BaseQuickAdapter<HighRiseBean,BaseViewHolder> {


    public HighRiseAdapter(@Nullable List<HighRiseBean> data) {
        super(R.layout.item_highrise, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HighRiseBean item) {
        Glide.with(mContext).load(item.getAvatarPath()).into((ImageView) helper.getView(R.id.iv_highrise_item));
        helper.setText(R.id.tv_content_highrise,item.getPosition())
                .addOnClickListener(R.id.ll_item_id)
        .setText(R.id.tv_name_highrise,item.getCname());
    }
}
